<template>
  <el-drawer v-model="drawerVisible" title="菜单" :with-header="false" direction="ltr" size="10%">
    <el-menu class="h-full border-0" router>
      <el-menu-item index="/mapHome">
        <Icon icon="mdi:map" class="mr-2" />
        围界车
      </el-menu-item>
      <el-menu-item index="/inspection">
        <Icon icon="mdi:cog" class="mr-2" />
        安保
      </el-menu-item>
    </el-menu>
  </el-drawer>
</template>

<script setup lang="ts">
import Icon from '@/components/Icon.vue'
import { ref } from 'vue'

const drawerVisible = ref(false)

const toggleDrawer = () => {
  drawerVisible.value = !drawerVisible.value
}

defineExpose({
  toggleDrawer
})
</script>
